package DataStructure.sort;

public class Test {
    public static void main(String[] args) {
        System.out.println(System.currentTimeMillis());
        Student s1 = new Student();
        s1.setUsername("张三");
        s1.setAge(14);

        Student s2 = new Student();
        s2.setAge(23);
        s2.setUsername("柳淇");

        Comparable max = getMax(s1, s2);
        System.out.println(max);
    }
    public static Comparable getMax(Comparable c1,Comparable c2){
        int result = c1.compareTo(c2);
        if(result>=0){
            return c1;
        }else{
            return c2;
        }
    }
}
